/***********************************************************************************
*
* 读取配置文件模块
* 配置文件wy-lan-rms/conf下
* 配置文件文件名以.conf结尾，以"#"为注释符，配置格式为：key=value。
*
**********************************************************************************/

#ifndef WY_READ_CONF_H
#define WY_READ_CONF_H

#define CONF_PATH	"../../../conf/"
#define CONF_CMT_FILE	"cmt_port.conf"
#define REMARK_STR	'#'

/*
* Default communication port.
* Use TCP protocol.
*/
/*Host operation*/
static int OPT_PORT = 5120;
/*Communication between Client/Server/Agent.*/
static int CMT_PORT = 5121;
/*Status Change, from Server to Client.*/
static int STATUS_PORT = 5122;
/*Make sure Client/Server/Agent is connected.*/
int CONN_PORT = 5123;
/*port string */
#define STR_OPT         "OPT_PORT"
#define STR_CMT         "CMT_PORT"
#define STR_STATUS      "STATUS_PORT"
#define STR_CONN        "CONN_PORT"

/*
* Read configuration file, and get communication port.
*
*/
int read_conf(void);

int get_opt_port(void);
int get_cmt_port(void);
int get_status_port(void);
int get_conn_port(void);

#endif

